<!-- 定义侧边栏片段 -->
<div th:fragment="sidebar(activeMenu)" class="sidebar" id="sidebar">
  <link rel="stylesheet" th:href="@{/css/sidebar.css}" />
  <script th:src="@{/js/sidebar.js}"></script>
  <div class="logo">
    <img
      src="https://img.icons8.com/fluency/48/000000/artificial-intelligence.png"
      alt="AI Logo"
    />
    <span>AI管理系统</span>
  </div>
  <div class="menu">
    <div class="menu-group">
      <div class="menu-header">
        <span>AI助手</span>
        <i class="arrow"></i>
      </div>
      <div class="submenu">
        <a
          th:href="@{/}"
          class="menu-item"
          th:classappend="${activeMenu == 'assistant' ? 'active' : ''}"
        >
          <span>AI会话</span>
        </a>
      </div>
    </div>

    <div class="menu-group">
      <div class="menu-header">
        <span>知识库管理</span>
        <i class="arrow"></i>
      </div>
      <div class="submenu">
        <a
          th:href="@{/knowledge}"
          class="menu-item"
          th:classappend="${activeMenu == 'knowledge' ? 'active' : ''}"
        >
          <span>知识库列表</span>
        </a>
        <a
          th:href="@{/knowledgeFile}"
          class="menu-item"
          th:classappend="${activeMenu == 'knowledgeFile' ? 'active' : ''}"
        >
          <span>知识导入</span>
        </a>
      </div>
    </div>
  </div>
</div>
